﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;

namespace Pigg.WebUi.Controllers.api
{
    [RoutePrefix("api/Account")]
    public class AccountController : ApiController
    {
        public IHttpActionResult Get()
        {
            return Ok(new { UserName = User.Identity.IsAuthenticated ? User.Identity.Name : "Non authenticated user" });
        }

        [Route("true")]
        public IHttpActionResult GetIsAuthenticated()
        {
            return Ok(new {User.Identity.IsAuthenticated});
        }
    }
}
